Add setup.py / setup.cfg shim delegating sdist / bdist_wheel to maturin#1
Merged
serge-wq merged 2 commits intolyft-stable-1.26.0from Apr 23, 2026
Merged
Conversation
- Updated version in `pyproject.toml` to "1.26.0.post0". - Changed repository URLs in `pyproject.toml` and `setup.cfg` to point to Lyft's GitHub. - Added `setup.cfg` and `setup.py` for compatibility with legacy `setup.py` workflows, delegating build tasks to `maturin`. - Updated `.gitignore` to include `*.egg-info/` directory.
AdiLyft
approved these changes
Apr 23, 2026
Comment on lines
+72
to
+81
| def _run_maturin(args: list[str]) -> None: | ||
| cmd = _maturin_cmd() + args | ||
| sys.stderr.write("Running: " + " ".join(cmd) + "\n") | ||
| subprocess.check_call(cmd, cwd=ROOT) | ||
|
|
||
|
|
||
| class sdist(_sdist): | ||
| def run(self) -> None: | ||
| self.mkpath(DIST_DIR) | ||
| _run_maturin(["sdist", "-o", DIST_DIR]) |
There was a problem hiding this comment.
QQ, does anything in the build pipeline invoke setup.py sdist/bdist_wheel with --dist-dir?
The custom run() methods hardcode dist and ignore self.dist_dir, so the flag would be silently swallowed.
If yes, worth reading self.dist_dir instead:
dist_dir = getattr(self, "dist_dir", DIST_DIR)
self.mkpath(dist_dir)
_run_maturin(["sdist", "-o", dist_dir])
If nothing passes the flag, ignore this comment since default is "dist" and behavior is identical.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a minimal
setup.py/setup.cfgshim sopython setup.py sdistandpython setup.py bdist_wheeldelegate tomaturin, for build environments that still drive distributions through setuptools instead ofpython -m build. Canonical build metadata remains inpyproject.toml/[tool.maturin].Details
setup.py: Customsdist/bdist_wheelcommands invokematurin; ifmaturinis missing, the shim runspip install maturinfor the active interpreter (first-time installs may need network access).1.26.0.post0inpyproject.tomlandsetup.cfg;temporalio.__version__remains1.26.0unless aligned in a follow-up.License :: OSI Approved :: MIT LicenseTrove classifier so setuptools ≥69 can mergepyproject.tomlwithout a PEP 639 conflict (license remainsMITin[project])..gitignore:*.egg-info/for localsetup.py/egg_inforuns.How to verify